package writers

import (
	"database/sql"
	"mig2kwdb/common"
)

type Writer interface {
	CreateDatabase(dbName string, IsSeries bool) error
	CreateSchema(dbName, schemaName string, IsSeries bool) error
	CreateTable(dbName, schemaName, tableName string, tableDef common.TableDefinition, IsSeries bool) error
	InsertRecords(dbName, schemaName, tableName string, columns []common.KwdbColumn, values [][]interface{}, from string, IsSeries bool) (uint64, error)
	InsertUpdateRecords(dbName, schemaName, tableName string, columns []common.KwdbColumn, values [][]interface{}, IsSeries bool) (uint64, error)
	UpdateRecord(dbName, schemaName, tableName string, columns []common.KwdbColumn, value []interface{}, from string, IsSeries bool) (uint64, error)
	DeleteRecord(dbName, schemaName, tableName string, columns []common.KwdbColumn, value []interface{}, from string, IsSeries bool) (uint64, error)
	GetConditionRows(databaseName, schemaName, tableName string, columns []common.KwdbColumn, condition string) (common.RowsInterface, error)
	DropTable(dbName, schemaName, tableName string, IsSeries bool) error
	IsNetworkError(err error) bool
	GetDataBaseType() string
	GetDB() *sql.DB
	Close()
	ReplicateRecords(dbName, schemaName, tableName string, columns []common.KwdbColumn, values [][]interface{}, sourceType, replicateType string) (uint64, error)
}
